#include <iostream>
using namespace std;

signed main()
{
    int n;
    cin>>n;
    int a[10005],l[10005],r[10005];
    int ans = 0;
    for(int i=0;i<n;i++){
        cin>>a[i];
    }
    for(int i=1;i<n;i++){
        if(a[i]>a[i-1])    l[i] = l[i-1]+1;
        else if(a[i]==a[i-1])    l[i] = l[i-1];
    }

    for(int i=n-2;i>=0;i--){
        if(a[i]>a[i+1])    r[i] = r[i+1]+1;
        else if(a[i]==a[i+1])    r[i] = r[i+1];
    }
    for(int i=0;i<n;i++){
        ans += 200+max(l[i],r[i])*100;
    }
    cout<<ans<<"\n";
    return 0;
}
